import pandas as pd
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.header import Header

message = MIMEText('邮件内容', 'html', 'utf-8')

message['Subject'] = Header('邮件主题', 'utf-8')
message['From'], message['To'] = '',''

# 使用qq或者163邮箱去发送
smtpObj = smtplib.SMTP_SSL('smtp.qq.com', 465)
smtpObj.login('发件人邮箱', '发件人邮箱密码')
smtpObj.sendmail('发件人邮箱',  [], message.as_string())

smtpObj.quit()
print('邮件发送成功')

